package com.example.demo.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Entity
@Table(name = "CS_SM_PASSWORD_D")
@ApiModel("用户密码修改记录实体类")
public class Password implements Serializable {
    private static final long serialVersionUID = 1633619229790169467L;

    @ApiModelProperty("主键")
    @Id
    @Column(name = "CS_SM_PASSWORD_ID")
    /*@SequenceGenerator(name = "PASSWORD_SEQ", sequenceName = "S_AAS_PASSWORD", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "PASSWORD_SEQ")*/
    private Long id;

    @ApiModelProperty("用户id")
    @Column(name = "CS_SM_USER_ID", unique = true, nullable = false)
    private Long userId;

    @ApiModelProperty("密码")
    @Column(name = "PASSWORD", nullable = false, length = 45)
    private String password;

    @ApiModelProperty("修改时间")
    @Column(name = "CREATE_TIME")
    private Date insertTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Date getInsertTime() {
        return insertTime;
    }

    public void setInsertTime(Date insertTime) {
        this.insertTime = insertTime;
    }

    @Override
    public String toString() {
        return "Password{" +
            "id=" + id +
            ", userId=" + userId +
            ", password='" + password + '\'' +
            ", insertTime=" + insertTime +
            '}';
    }
}
